✨fix(leaderboard): correct leaderboard API key typos constants#2330
✨fix(leaderboard): correct leaderboard API key typos constants#2330
Conversation
There was a problem hiding this comment.
Pull request overview
This PR corrects typos in the persisted farmerstate misc-setting keys used by the leaderboard permission flow, aligning the stored key names with the intended "allow_leaderboard_api*" naming.
Changes:
- Fix
LeaderboardPermissionKeystring constant (allow_leaderboard_apix→allow_leaderboard_api) - Fix
LeaderboardPermissionSpanKeystring constant (allow_leaderboard_apix_span→allow_leaderboard_api_span)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const ( | ||
| // LeaderboardPermissionKey is the key used to store the timestamp of when the user allowed leaderboard API permissions | ||
| LeaderboardPermissionKey = "allow_leaderboard_apix" | ||
| LeaderboardPermissionKey = "allow_leaderboard_api" | ||
| // LeaderboardPermissionSpanKey holds the selected permission duration ("24h" or "forever") | ||
| LeaderboardPermissionSpanKey = "allow_leaderboard_apix_span" | ||
| LeaderboardPermissionSpanKey = "allow_leaderboard_api_span" |
There was a problem hiding this comment.
Changing these persisted misc-setting keys will orphan existing saved permissions (values stored under the previous "allow_leaderboard_apix*" keys will no longer be read), causing users to be re-prompted and losing any prior "forever" grants. Consider adding backwards-compatible reads (check old keys when new key is empty) and migrating by writing the value to the new key (and optionally deleting the old key).
No description provided.